package product.jbpmDesign;

import java.util.ArrayList;
import java.util.List;
/**
 *类描述:
 *@作者 hjl
 *@日期:2012-10-8 时间:下午03:23:23
 *@功能:用于将xml转成对应的json
 */
public class LinePosition {
	private List dotsList = new ArrayList();
	private Coordinate textPos = new Coordinate();
	//eg:661,266;661,517:-1,102
	public void doSplit(String gStr){
		String[] array = gStr.split(":");
		if(array.length==1){
			textPos.doSplit(array[0]);
		}else{
			String[] dotsArray = array[0].split(";");
			for(String dot:dotsArray){
				Coordinate coordinate = new Coordinate();
				coordinate.doSplit(dot);
				dotsList.add(coordinate);
			}
			textPos.doSplit(array[1]);
		}
	}
	public List getDotsList() {
		return dotsList;
	}
	public void setDotsList(List dotsList) {
		this.dotsList = dotsList;
	}
	public Coordinate getTextPos() {
		return textPos;
	}
	public void setTextPos(Coordinate textPos) {
		this.textPos = textPos;
	}
}
